#pragma once

#include "dut/WinMin.h"
#include "dut/DXTrace.h"
#include "dut/d3dUtil.h"



using namespace Microsoft::WRL;

namespace Dut
{
	struct Shader
	{

		ComPtr<ID3D11InputLayout> m_pVertexLayout;     
		ComPtr<ID3D11VertexShader> m_pVertexShader;    
		ComPtr<ID3D11PixelShader> m_pPixelShader;      

		HRESULT Create(
			ID3D11Device* device,
			const std::wstring& vpath, const std::wstring& fpath, const D3D11_INPUT_ELEMENT_DESC* desc, int numDesc);
		void Use(ID3D11DeviceContext* context);

	private:

		HRESULT CreateShaderFromFile(
			const WCHAR* csoFileNameInOut,
			const WCHAR* hlslFileName,
			LPCSTR entryPoint,
			LPCSTR shaderModel,
			ID3DBlob** ppBlobOut);


	};
}